calculate the current drawn from the battery